﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace MES_SystemUI.UI.GlobalSet
{
    public partial class GlobalSet : Form
    {
        BackColorForm backColorForm = new BackColorForm();
        FontForm fontForm = new UI.GlobalSet.FontForm();
        PageForm PageForm = new PageForm();
        SQLForm SQLForm = new SQLForm();
        RestForm RestForm = new RestForm();
        public GlobalSet()
        {
            InitializeComponent();
            button1.Click += Button1_Click;
            button2.Click += Button2_Click;
            button3.Click += Button3_Click;
            button4.Click += Button4_Click;
            button5.Click += Button5_Click;
        }

        private void Button5_Click(object sender, EventArgs e)
        {
            OpenForm(RestForm);
        }

        private void Button4_Click(object sender, EventArgs e)
        {
            OpenForm(SQLForm);
        }

        private void Button3_Click(object sender, EventArgs e)
        {
            OpenForm(PageForm);
        }

        private void Button2_Click(object sender, EventArgs e)
        {
            OpenForm(fontForm);
        }

        private void Button1_Click(object sender, EventArgs e)
        {
            OpenForm(backColorForm);
        }
        private void OpenForm(Form fron)
        {
            panel2.Controls.Clear();
            fron.TopLevel = false;
            panel2.Controls.Add(fron);
            fron.Dock = DockStyle.Fill;
            fron.Show();
        }
    }
}
